<div id="viewer-container"></div>
<script>
  let viewer = undefined
  function initViewer() {
    viewer = new DC.Viewer('viewer-container')
    let baselayer = DC.ImageryLayerFactory.createAmapImageryLayer()
    viewer.addBaseLayer(baselayer, {
      iconUrl: 'examples/images/icon/elec.png',
      name: '电子'
    })

    let baselayer_img = DC.ImageryLayerFactory.createAmapImageryLayer({
      style: 'img'
    })
    viewer.addBaseLayer(baselayer_img, {
      iconUrl: 'examples/images/icon/img.png',
      name: '地图'
    })

    viewer.zoomToPosition(
      new DC.Position(105.565571, 31.984708, 15362816, 0, -90)
    )
  }
  DC.ready(initViewer)
</script>
